#pragma once

// Initiates Direct Draw 7

HRESULT DDrawInit(HWND hWnd);

// Clears Direct Draw 7 resources

HRESULT ClearDDraw();

// Displays the image (loaded every frame)

HRESULT ShowVideo(HWND hWnd);

// Prepares surfaces, filles VideoFile buffer

HRESULT LoadVideo(VideoFile *vid, HWND hWnd, bool Dialog);

// Prepares and shows "Load" dialog and opens file

HANDLE GetOpenFile(HWND hWnd);

// Prepares and  shows "Save as" dialog and opens file

int SaveFile(HWND hWnd);

// Clears buffers and fields of VideoFile structure

HRESULT ReleaseVideo(VideoFile *vid);

// Saves Video to a file.

HRESULT SaveVideo(HANDLE file, enum VideoType *Type);

// Converts the VideoFile structure from YUV to HSB
// !!!Not used any more!!!

HRESULT ConvVideoYUVtoHSB(VideoFile *in, VideoFile *out);

HRESULT LoadPicture(LPDIRECTDRAWSURFACE7 *surf, DWORD Resource, int flags);